<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body>
	<div class="layui-fluid">
		<div class="layui-card">
			<div class="layui-form layui-card-header layuiadmin-card-header-auto"
				id="searchForm">
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label">订单号</label>
						<div class="layui-input-block">
							<input type="text" name="orderId" autocomplete="off"
								class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">接车人</label>
						<div class="layui-input-block">
							<input type="text" name="username" autocomplete="off"
								class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">手机</label>
						<div class="layui-input-block">
							<input type="text" name="mobile" autocomplete="off"
								class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">车牌号</label>
						<div class="layui-input-block">
							<input type="text" name="carNum" autocomplete="off"
								class="layui-input">
						</div>
					</div>

					
					<div class="layui-inline">
						<label class="layui-form-label">车辆年限</label>
						<div class="layui-input-block">
							<select name="cardType" lay-select-dict="card_type">
							</select>
						</div>
					</div>
					
					<div class="layui-inline">
						<label class="layui-form-label">详细地址</label>
						<div class="layui-input-block">
								<input type="text" name="detailAddress" autocomplete="off"
									class="layui-input">		
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">下单时间</label>
						<div class="layui-input-block">
							<input type="text" name="orderTimeStart" id="orderTimeStart"
								autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">至</label>
						<div class="layui-input-block">
							<input type="text" name="orderTimeEnd" id="orderTimeEnd"
								autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">是否支付</label>
						<div class="layui-input-block">
							<select name="whetherPay" lay-select-dict="whether_type">
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<button class="layui-btn layuiadmin-btn-sm" lay-submit
							lay-filter="searchSubmit">查询</button>
					</div>
				</div>
			</div>
			<div class="layui-card-body">
				<table id="dataList" lay-filter="dataList"></table>


			</div>
		</div>
	</div>
	<link rel="stylesheet" th:href="@{/css/common/loader.css}" media="all" />
	<link rel="stylesheet" th:href="@{/css/common/tablepage.css}"
		media="all" />
	<div type="text/html" id="trTool" style="display: none">
		<a 
			class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail"><i
			class="layui-icon layui-icon-search"></i>详情
		</a>
	</div>

	<div th:include="include :: footer"></div>
	<script>
		layui.config({
					base : cxt + 'layuiadmin/' //静态资源所在路径
				})
				.extend({
					webplus : 'lib/webplus'//主入口模块

				})
				.use(
						[ 'table', 'form', 'laydate', 'webplus' ],
						function() {
							var $ = layui.$,
							webplus = layui.webplus,
							laydate = layui.laydate, 
							form = layui.form, 
							table = layui.table;
							//日期
							laydate.render({
								elem : '#orderTimeStart'
							});
							//日期
							laydate.render({
								elem : '#orderTimeEnd'
							});
							
							var cols = [ [ {
								type : 'numbers',
								title : '序号'
							}, {
								field : 'orderId',
								title : '订单号',
								width : 125
							}, {
								field : 'orderAmount',
								title : '金额（元)',
								width : 100
							}, {
								field : 'username',
								title : '接车人',
								width : 90
							}, {
								field : 'mobile',
								title : '手机',
								width : 130
							}, {
								field : 'carNum',
								title : '车牌号',
								width : 100
							},
							{
								field : 'carLimit_dict',
								title : '车辆年限',
								width : 100
							}, 
							{
								field : 'detailAddress',
								title : '详细地址',
								width : 200
							}, {
								field : 'orderTime',
								title : '下单时间',
								width : 170
							}, {
								field : 'whetherPay_dict',
								title : '是否支付',
								width : 90
							} ] ];

							webplus.init('business/order/list?orderType=2', cols, '', '',
									'', '-1', '')
							//监听行工具事件
							table.on('tool(dataList)', function(rowObj) {
								switch (rowObj.event) {
								
								case 'del':

									webplus.removeRow('business/order/remove',
											rowObj, 'orderId');
									break;
								}
							});
						
							

						});
	</script>

</body>
</html>